package jgl.vajra.kingkong.part.vehicle.activity;

import androidx.fragment.app.Fragment;

import java.util.ArrayList;
import java.util.List;

import jgl.vajra.kingkong.R;
import jgl.vajra.kingkong.databinding.ActivityCouponPageBinding;
import jgl.vajra.kingkong.manager.FragmentManager;
import jgl.vajra.kingkong.part.home.fragment.OrderPageListFragment;
import jgl.vajra.kingkong.part.mine.fragment.CouponPageListFragment;
import jgl.vajra.kingkong.part.vehicle.viewModel.CouponPageViewModel;
import jgl.vajra.kingkong.widget.mvvm.factory.CreateViewModel;
import jgl.vajra.kingkong.widget.mvvm.view.BaseMVVMActivity;

@CreateViewModel(CouponPageViewModel.class)
public class CouponPageActivity extends BaseMVVMActivity<CouponPageViewModel, ActivityCouponPageBinding> {
    @Override
    public int getLayoutId() {
        return R.layout.activity_coupon_page;
    }

    @Override
    public void initView() {
        super.initView();

        List<String> titleList = new ArrayList<>();
        titleList.add("未使用");
        titleList.add("已使用");
        titleList.add("已过期");
        List<Fragment> fragmentList = new ArrayList<>();
        CouponPageListFragment listFragment1 = FragmentManager.getCouponPageListFragment(1);
        fragmentList.add(listFragment1);
        CouponPageListFragment listFragment2 = FragmentManager.getCouponPageListFragment(2);
        fragmentList.add(listFragment2);
        CouponPageListFragment listFragment3 = FragmentManager.getCouponPageListFragment(3);
        fragmentList.add(listFragment3);

        mBinding.tabLayout.setCustomViewTabLayoutView(this, titleList, fragmentList);
    }
}
